package me.sdevil507.org.mapper;

import me.sdevil507.org.dto.OrgUserRelResultDto;
import me.sdevil507.org.po.OrgUserRelPo;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 转换Mapper
 *
 * @author sdevil507
 * created on 2020/7/20
 */
@Component
@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, uses = {OrgDeptMapper.class})
public interface OrgUserRelMapper {

    /**
     * po => dto
     *
     * @param po po
     * @return dto
     */
    OrgUserRelResultDto po2dto(OrgUserRelPo po);

    /**
     * pos => dtos
     *
     * @param pos pos
     * @return dtos
     */
    List<OrgUserRelResultDto> pos2dtos(List<OrgUserRelPo> pos);
}
